package com.bean;

import com.sun.imageio.plugins.common.I18N;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;

import java.time.LocalDate;
import java.time.LocalTime;

public class Worker {
    public Worker() {

    }




    public String getWno() {
        return wno;
    }

    public void setWno(String wno) {
        this.wno = wno;
    }

    public String getWname() {
        return wname;
    }

    public void setWname(String wname) {
        this.wname = wname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getJobtype() {
        return jobtype;
    }

    public void setJobtype(String jobtype) {
        this.jobtype = jobtype;
    }

    public String getPostion() {
        return postion;
    }

    public void setPostion(String postion) {
        this.postion = postion;
    }

    public Integer getWages() {
        return wages;
    }

    public void setWages(int wages) {
        this.wages = wages; // 使用 set 方法来更新值，这会触发属性更改事件
    }

        private String wno;
        private String wname;
        private String sex;
        private String idcard;
        private LocalDate birthday;
        private String jobtype;
        private String postion;
        private Integer wages;
    private BooleanProperty selected = new SimpleBooleanProperty(false);

    public boolean isSelected() {
        return selected.get();
    }

    public void setSelected(boolean selected) {
        this.selected.set(selected);
    }

    public BooleanProperty selectedProperty() {
        return selected;
    }

    public Worker(String wno, String wname, String sex, String idcard, LocalDate birthday, String jobtype, String postion, Integer wages) {
        this.wno = wno;
        this.wname = wname;
        this.sex = sex;
        this.idcard = idcard;
        this.birthday = birthday;
        this.jobtype = jobtype;
        this.postion = postion;
        this.wages = wages;
    }



}
